package com.fwmagic.spark.core.cases.globalsort

case class CaseBoy(name:String,age:Int,faceValue:Double)  extends Ordered[CaseBoy]{
    override def compare(that: CaseBoy): Int = {
        if (this.faceValue == that.faceValue){
            this.age - that.age
        }else{
            -(this.faceValue-that.faceValue).toInt
        }
    }
}